{% extends "base.html" %}

{% block label %}
    <div class="col-lg-12">
        <h1 class="page-header">职员管理-添加</h1>
    </div>
{% endblock %}

{% block content %}
    <div class="col-lg-12">
        <div class="row">
            <p></p>
            <form method="post" enctype="multipart/form-data">
                <div class="form-group">
                    <label class="control-label">用户名：</label>
                    <input class="form-control" type="text" name="username">
                    <label class="text-primary username_error"></label>
                </div>
                <div class="form-group">
                    <label class="control-label">密码：</label>
                    <input class="form-control" type="password" name="password">
                    <label class="text-primary password_error"></label>
                </div>
                <div class="form-group">
                    <label class="control-label">昵称：</label>
                    <input class="form-control" type="text" name="nickname">
                </div>
                <div class="form-group">
                    <label class="control-label">性别：</label>
                    <select class="form-control" name="gender">
                        <option value="男" selected>男</option>
                        <option value="女">女</option>
                    </select>
                </div>
                <div class="form-group">
                    <label class="control-label">年龄：</label>
                    <input class="form-control" type="number" name="age">
                </div>
                <div class="form-group">
                    <label class="control-label">电话：</label>
                    <input class="form-control" type="text" name="phone">
                </div>
                <div class="form-group">
                    <label class="control-label">邮箱：</label>
                    <input class="form-control" type="text" name="email">
                </div>
                <div class="form-group">
                    <label class="control-label">头像：</label>
                    <input type="file" name="photo">
                </div>
                <div class="form-group">
                    <label class="control-label">地址：</label>
                    <textarea class="form-control" name="address"></textarea>
                </div>
                <div class="form-group">
                    <label class="control-label">部门：</label>
                    <select class="form-control" name="department_id">
                        {% for d in department_list %}
                        <option value="{{ d.id }}">{{ d.d_name }}</option>
                        {% endfor %}
                    </select>
                </div>

                <div class="form-group">
                    <label class="control-label">职位：</label>
                    <select class="form-control" name="position_id">
                        {% for p in position_list %}
                        <option value="{{ p.id }}">{{ p.p_name }}</option>
                        {% endfor %}
                    </select>
                </div>
                <div class="form-group">
                    <button class="btn btn-primary btn-block">提交</button>
                </div>
            </form>
        </div>
    </div>
{% endblock %}